package com.gangan.service.impl;

import com.gangan.mapper.OrderMapper;
import com.gangan.mapper.PatientMapper;
import com.gangan.model.Order;
import com.gangan.model.Patient;
import com.gangan.service.IOrderService;
import com.gangan.service.IPatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class  PatientServiceImpl  implements IPatientService {


    @Autowired
    PatientMapper patientMapper;
    /**
     * 查询所有候选人
     * @return
     */
    @Override
    public List<Patient> getPatientList() {

        return patientMapper.getPatientList();
    }

    @Override
    public List<Patient> getPatientByUser(Integer userId) {
        return  patientMapper.getPatientByUser(userId);
    }

    /**
     * 新增就诊人信息
     * @param patient
     */
    @Override
    public void addPatient(Patient patient) {

        patientMapper.addPatient(patient);
    }

    /**
     * 多条件查询候诊人
     * @param param
     * @return
     */
    @Override
    public List<Patient> getListByWhere(String param) {
        return patientMapper.getListByWhere(param);
    }

    /**
     * 为患者分配医生
     * @param map
     */
    @Override
    public void disDoctor(Map<String, Object> map) {
        patientMapper.disDoctor(map);
    }
}
